#include<stdio.h>

int main()
{
	int arr[5] = {5, 4, 3, 2, 1};
	int i, j;
	int n = 5;
	int flag = 1;
	for (i = 0; i < n-1 && flag == 1; i++)
	{
		flag = 0;
		for (j = 0; j < n-1-i; j++)
		{
			if (arr[j] > arr[j+1])
			{
				int tmp = arr[j];
				arr[j] = arr[j+1];
				arr[j+1] = tmp;
				flag = 1;
			}
		}
	}
	
	for (i = 0; i < n; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");
	
	return 0;
}


